package com.xcity.pomelo.response;

import java.util.ArrayList;
import java.util.List;

import com.xcity.db.entity.Player;
import com.xcity.game.battle.res.ResStage;
import com.xcity.game.common.ItemResponse;
import com.xcity.game.item.ItemInfo;

import naga.x.net.impl.pomelo.PomeloMessage;
import naga.x.net.impl.pomelo.protocol.Message;

@PomeloMessage(type = Message.Type.RESPONSE)
public class ResStageSweepResponse extends Response {

	private int id;
	private int type;
	private int dayCount;
	private int cdSecond;
	private int money;
	private int exp;
	private List<ItemInfo> items;
	
	public ResStageSweepResponse(int serial, Player player, ResStage stage, int gold, int exp, List<ItemResponse> items) {
		super(serial);
		this.id = stage.getIndex();
		this.type = stage.getTemplate().getType();
		this.dayCount = player.getResStages().getTodayCount(stage);
		this.cdSecond = player.getResStages().getTypeInfo().getLeftSecondByType(type);
		this.money = gold;
		this.exp = exp;
		this.items = new ArrayList<ItemInfo>();
		if(items != null){
			for(int i = 0; i < items.size(); i++){
				this.items.add(items.get(i));
			}
		}
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public int getDayCount() {
		return dayCount;
	}

	public void setDayCount(int dayCount) {
		this.dayCount = dayCount;
	}

	public int getCdSecond() {
		return cdSecond;
	}

	public void setCdSecond(int cdSecond) {
		this.cdSecond = cdSecond;
	}

	public int getMoney() {
		return money;
	}

	public void setMoney(int money) {
		this.money = money;
	}

	public int getExp() {
		return exp;
	}

	public void setExp(int exp) {
		this.exp = exp;
	}

	public List<ItemInfo> getItems() {
		return items;
	}

	public void setItems(List<ItemInfo> items) {
		this.items = items;
	}

	
}
